﻿namespace MugenMvvmToolkit.ReSharper
{
    internal static class CodeTemplateConstants
    {
        public const string ModelPropertyTemplate =
            @"public $0 $1 { get { return Entity.$1; } set { Entity.$1 = value; } }";

        public const string ModelPropertyWithNotifyPropertyChangedTemplate =
            @"public $0 $1 { get { return Entity.$1; } set { Entity.$1 = value; OnPropertyChanged(""$1""); } }";

        public const string CloseableViewModelFacadeField = "private readonly $0 _closeableViewModelFacade;";

        public const string CloseableViewModelAssignField = "GlobalSettings.GetCloseableFacade(this, OnPropertyChanged);";

        public const string CloseableViewModelAssignFieldWithCanClose = "GlobalSettings.GetCloseableFacade(this, OnPropertyChanged, CanClose);";

        public const string CloseableViewModelAssignFieldWithProtectedMethods = "GlobalSettings.GetCloseableFacade(this, OnPropertyChanged, CanClose, OnClosing, OnClosed);";

        public const string CloseableViewModelCloseCommand =
            "public $0 CloseCommand { get {return _closeableViewModelFacade.CloseCommand; } set { _closeableViewModelFacade.CloseCommand = value; } }";

        public const string CloseableViewModelCloseMethod = @"
public {0} Close(object parameter)
{{
    EnsureIsNotDisposed();
    return _closeableViewModelFacade.Close(parameter);
}}";

        public const string CloseableViewModelClosingEvent = @"
public event ViewModelClosingDelegate Closing
{
    add { _closeableViewModelFacade.Closing += value; }
    remove { _closeableViewModelFacade.Closing -= value; }
}";

        public const string CloseableViewModelClosedEvent = @"
public event ViewModelClosedDelegate Closed
{
    add { _closeableViewModelFacade.Closed += value; }
    remove { _closeableViewModelFacade.Closed -= value; }
}";

        public const string CloseableViewModelCanCloseMethod = @"
protected virtual bool CanClose(object param)
{
    return true;
}";

        public const string CloseableViewModelOnClosingMethod = @"
protected virtual {0} OnClosing(object parameter)
{{
    return MvvmUtils.TrueTaskResult;
}}";

        public const string CloseableViewModelOnClosedMethod = @"
protected virtual void OnClosed(object parameter)
{    
}";
        public const string AutoProperty = "public $0 $1 { get; set; }";
    }

    internal static class ClassNameConstants
    {
        public const string BaseViewModelAttribute = "MugenMvvmToolkit.Annotations.BaseViewModelAttribute";

        public const string BaseViewAttribute = "MugenMvvmToolkit.Annotations.BaseViewAttribute";

        public const string WrapperAttribute = "MugenMvvmToolkit.Annotations.WrapperAttribute";

        public const string SuppressTaskBusyHandlerAttribute = "MugenMvvmToolkit.Annotations.SuppressTaskBusyHandlerAttribute";

        public const string NotEmptyParamsAttribute = "MugenMvvmToolkit.Annotations.NotEmptyParamsAttribute";

        public const string ShouldBeInitializedAttribute = "MugenMvvmToolkit.Annotations.ShouldBeInitializedAttribute";

        public const string ViewModelTypeRequiredAttribute = "MugenMvvmToolkit.Annotations.ViewModelTypeRequiredAttribute";
        
        public const string FrameworkElement = "System.Windows.FrameworkElement";

        public const string FrameworkElementWinRT = "Windows.UI.Xaml.FrameworkElement";

        public const string Window = "System.Windows.Window";

        public const string ChildWindow = "System.Windows.Controls.ChildWindow";

        public const string UiPage = "System.Windows.Controls.Page";

        public const string UiPageWinRT = "Windows.UI.Xaml.Controls.Page";

        public const string ViewModelAttribute = "MugenMvvmToolkit.Attributes.ViewModelAttribute";

        public const string IgnorePropertyAttribute = "MugenMvvmToolkit.Attributes.IgnorePropertyAttribute";

        public const string ModelPropertyAttribute = "MugenMvvmToolkit.Attributes.ModelPropertyAttribute";

        public const string PageViewModelAttribute = "MugenMvvmToolkit.Attributes.PageViewModelAttribute";

        public const string Should = "MugenMvvmToolkit.Should";

        public const string MvvmUtils = "MugenMvvmToolkit.Utils.MvvmUtils";

        public const string ViewModelExtensions = "MugenMvvmToolkit.ViewModels.ViewModelExtensions";

        public const string MvvmExtensions = "MugenMvvmToolkit.ViewModels.MvvmExtensions";

        public const string GlobalSettings = "MugenMvvmToolkit.Infrastructure.GlobalSettings";

        public const string CloseableViewModelFacade = "MugenMvvmToolkit.Infrastructure.CloseableViewModelFacade";

        public const string NotifyPropertyChangedBase = "MugenMvvmToolkit.ViewModels.NotifyPropertyChangedBase";

        public const string ViewModelBase = "MugenMvvmToolkit.ViewModels.ViewModelBase";

        public const string WorkspaceViewModel = "MugenMvvmToolkit.ViewModels.WorkspaceViewModel";

        public const string MultiViewModel = "MugenMvvmToolkit.ViewModels.MultiViewModel";

        public const string ValidatableViewModel = "MugenMvvmToolkit.ViewModels.ValidatableViewModel";

        public const string NavigableViewModel = "MugenMvvmToolkit.ViewModels.NavigableViewModel";

        public const string WindowViewModel = "MugenMvvmToolkit.ViewModels.WindowViewModel";

        public const string ChildWindowViewModel = "MugenMvvmToolkit.ViewModels.ChildWindowViewModel";

        public const string GridViewModel = "MugenMvvmToolkit.ViewModels.GridViewModel`1";

        public const string EditableViewModel = "MugenMvvmToolkit.ViewModels.EditableViewModel`1";

        public const string ViewModelClosingDelegate = "MugenMvvmToolkit.Models.ViewModelClosingDelegate";

        public const string ViewModelClosedDelegate = "MugenMvvmToolkit.Models.ViewModelClosedDelegate";
    }

    internal static class InterfaceNameConstants
    {
        public const string Command = "System.Windows.Input.ICommand";

        public const string View = "MugenMvvmToolkit.Interfaces.Views.IView";

        public const string ViewGeneric = "MugenMvvmToolkit.Interfaces.Views.IView`1";

        public const string WindowView = "MugenMvvmToolkit.Interfaces.Views.IWindowView";

        public const string ChildWindowView = "MugenMvvmToolkit.Interfaces.Views.IChildWindowView";

        public const string ViewModel = "MugenMvvmToolkit.Interfaces.ViewModels.IViewModel";

        public const string CloseableViewModel = "MugenMvvmToolkit.Interfaces.ViewModels.ICloseableViewModel";

        public const string NotifyViewModelClosing = "MugenMvvmToolkit.Interfaces.ViewModels.INotifyViewModelClosing";

        public const string EditableViewModel = "MugenMvvmToolkit.Interfaces.ViewModels.IEditableViewModel";

        public const string ValidatableViewModel = "MugenMvvmToolkit.Interfaces.ViewModels.IValidatableViewModel";
    }

    internal static class MethodNameConstants
    {
        public const string ShouldNotBeNull = "NotBeNull";

        public const string ShouldNotBeNullOrEmpty = "NotBeNullOrEmpty";

        public const string ShouldNotBeNullOrWhitespace = "NotBeNullOrWhitespace";

        public const string ShouldNotBeNullOrDefault = "NotBeNullOrDefault";

        public const string ShouldNotBeDefault = "NotBeDefault";

        public const string ViewModelBaseGetMethod = "Get";

        public const string ValidatableViewModelInterfaceValidate = "Validate";

        public const string ViewModelExtensionsWrapTo = "WrapTo";

        public const string CloseableViewModelInterfaceClose = "Close";

        public const string MvvmExtensionsWithBusyIndicator = "WithBusyIndicator";
    }

    internal static class PropertyNameConstants
    {
        public const string EdiatableViewModelEntity = "Entity";
    }

    internal static class GeneratorKindConstants
    {
        public const string GenerateModelProperties = "GenerateModelProperties.Kind";
    }

    internal static class ActionIdConstants
    {
        public const string GenerateModelProperties = "GenerateModelProperties.Id";

        public const string GotoViewsNavigationAction = "GoToViews";

        public const string GotoViewModelsNavigationAction = "GoToViewModels";

        public const string ViewViewModelNavigationAction = "GoToViewViewModel";
    }

    internal static class XamlNamespaceConstants
    {
        public const string DesignBlend = "http://schemas.microsoft.com/expression/blend/2008";

        public const string MarkupCompatibility = "http://schemas.openxmlformats.org/markup-compatibility/2006";
    }

    internal static class SeverityHighlightingConstants
    {
        public const string UnusedMember = "UnusedMember";
    }
}